/***********************************
* Name: Route.java
* Date: Aug 11, 2010
* @author martin
* Description:
***********************************/

import java.util.LinkedList;

public class Route {

    private LinkedList<String> gates_in_order_from_input = new LinkedList<String>();
    private boolean falseRoute;
    
    public Route(){}


    public Route(String inverse_route){
        
        //System.out.println("Inverse route: "+inverse_route);
        String a[] = inverse_route.split("-");

        for(int j=a.length-1;j>=0;j=j-1){
            this.gates_in_order_from_input.add(a[j]);
        }

    }
    
    public String toString(){
        //get first
        String temp = this.getGates_in_order_from_input().get(0);
        //get the others
        for(int i=1;i<this.getGates_in_order_from_input().size();i++){
            temp+=" -> "+this.getGates_in_order_from_input().get(i);
        }
        return temp;
    }

    /*****************************************
     * @return the gates_in_order_from_input
     *****************************************/
    public LinkedList<String> getGates_in_order_from_input() {
        return gates_in_order_from_input;
    }

    /*****************************************
     * @return the falseRoute
     *****************************************/
    public boolean isFalseRoute() {
        return falseRoute;
    }

    /*****************************************
     * @param falseRoute the falseRoute to set
     *****************************************/
    public void setFalseRoute(boolean falseRoute) {
        this.falseRoute = falseRoute;
    }

}